package api

import (
	"github.com/astaxie/beego"
)

// BaseController operations for Base
type BaseController struct {
	beego.Controller
}

func (c *BaseController) Prepare() {

	admin := c.GetSession("AdminUser")

	c.Data["json"] = admin

	admin = 1
	if admin == nil {

		c.Data["json"] = map[string]interface{}{"code": 1, "message": "请先登录"}

	}

	//c.ServeJSON()

}
